//
//  CTCConsultQuestionCell.m
//  ConsultantVersion
//
//  Created by 李小龙 on 2017/3/27.
//  Copyright © 2017年 jieshuibao. All rights reserved.
//

#import "CTCConsultQuestionCell.h"

@interface CTCConsultQuestionCell()
@property (weak, nonatomic) IBOutlet UIImageView *headImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) IBOutlet UILabel *dateLabel;
@property (weak, nonatomic) IBOutlet UIView *redView;
@end
@implementation CTCConsultQuestionCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setQuestionModel:(CTCQuestionModel *)questionModel
{
    _questionModel = questionModel;
    [SDWebImageTool imageView:self.headImageView imageName:questionModel.headImg placeHolder:@"default-head" showProgress:NO];
    self.nameLabel.text = questionModel.name;
    self.contentLabel.text = questionModel.content;
    self.dateLabel.text = [NSDate stringFromTimestamp:questionModel.date];
    
    if ([questionModel.status integerValue] == 2) {
        self.redView.hidden = NO;
    } else {
        self.redView.hidden = YES;
    }
}



- (void)setIsLimitThree:(BOOL)isLimitThree
{
    _isLimitThree = isLimitThree;
    if (isLimitThree) {
        self.contentLabel.numberOfLines = 3;
    } else {
        self.contentLabel.numberOfLines = 0;
    }
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
